package com.zhugang.week09;

/**
 * @program algorithms
 * @description: graph
 * @author: chanzhugang
 * @create: 2022/08/22 11:36
 */
public class Graph1 {

    /**
     * 又向无权图：邻接矩阵
     */

    private int v;
    // 二维数组
    private boolean matrix[][];

    public Graph1(int v) {
        this.v = v;
        matrix = new boolean[v][v];
    }

    public void addEdge(int s, int t) {
        matrix[s][t] = true;
    }
}